set(UTIL_DIR util)
file(GLOB_RECURSE UTIL_SOURCES ${UTIL_DIR}/*.c)

set(SCREEN_DRIVE_DIR Screen)
file(GLOB_RECURSE SCREEN_DRIVE_SOURCE ${SCREEN_DRIVE_DIR}/*.c)

set(CUSTOM_FRAME_DIR Frame)
file(GLOB_RECURSE CUSTOM_FRAME_SOURCES ${CUSTOM_FRAME_DIR}/*.c)

set(SENSOR_PAYLOAD_DIR Sensors)
file(GLOB_RECURSE SENSOR_PAYLOAD_SOURCES ${SENSOR_PAYLOAD_DIR}/*.c)

set(LVGL_UI_DIR ui)
file(GLOB_RECURSE LVGL_UI_SOURCE ${LVGL_UI_DIR}/*.c)

idf_component_register(
    SRCS "main.c" ${UTIL_SOURCES} ${SCREEN_DRIVE_SOURCE} ${CUSTOM_FRAME_SOURCES} ${SENSOR_PAYLOAD_SOURCES} ${LVGL_UI_SOURCE}
    INCLUDE_DIRS "."  ${UTIL_DIR} ${SCREEN_DRIVE_DIR} ${CUSTOM_FRAME_DIR} ${SENSOR_PAYLOAD_DIR} ${LVGL_UI_DIR})
